s = input().split()
t = input().split()

for i in s:
	for j in t:
		print(i+j,end = " ")
	print("")